

export const register = {
  path: '/register',
  name: 'register',
  meta: {
    title: '注册',
  },
  // component: () => import('@/view/register/Register')
}

export const login = {
  path: '/login',
  name: 'login',
  meta: {
    title: '登录',
  },
  component: () => import('@/view/login/Login')
}

export const pasBack = {
  path: '/pasBack',
  name: 'pasBack',
  meta: {
    title: '忘记密码',
  },
  // component: () => import('@/view/forget/PasBack')
}

export const app = {
  path: '/',
  redirect: {
    path: '/login'
  }
}

export const mainRouter = {
  path: '/main',
  component: () => import('@/view/Main'),
  children: [
    {
      path: 'house',
      name: 'house',
      meta: {
        title: '房源管理',
      },
      component: () => import('@/view/house/House')
    },
    {
      path: 'alreadyCompany',
      name: 'alreadyCompany',
      meta: {
        title: '已入住企业管理',
      },
      component: () => import('@/view/alreadyCompany/alreadyCompany')
    },
    {
      path: 'advertManage',
      name: 'advertManage',
      meta: {
        title: '广告管理',
      },
      component: () => import('@/view/advert/AdvertManage')
    },
  ]
}






export default new VueRouter({
  mode: 'hash',
  routes: [
    register,
    login,
    pasBack,
    app,
    mainRouter,
  ]
})
